package struts.ext.base;

import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

public interface ExtServletWrapper {

	@SuppressWarnings("unchecked")
	public Map getParameterMap();
	
	
	public void setAttribute(String key,Object value);
	public Object getAttribute(String key);
	
	public ActionForward findForward(String name);

	public ActionForward newForward(String path);
	
	public ActionForward newForward(String path, boolean redirect);
	
	public String getParameter(String key);
	
	public String getParameter(String key,String ifNull);
	
	public String[] getParameterValues(String key);
	
	
	public Integer getIntegerParameter(String key);
	
	public Integer getIntegerParameter(String key,int ifNull);

	public Integer[] getIntegerParameterValues(String key);
	

	public Double getDoubleParameter(String key);
	
	public Double getDoubleParameter(String key,double ifNull);

	public Double[] getDoubleParameterValues(String key);
	
	
	public Boolean getBooleanParameter(String key);
	
	public Boolean getBooleanParameter(String key,boolean ifNull);

	public Boolean[] getBooleanParameterValues(String key);
	
	
	public HttpSession getSession();
	
	public HttpSession getSession(boolean create);

	public HttpServletRequest getRequest();

	public HttpServletResponse getResponse();

	public ActionForm getForm();
	
	public ActionMapping getMapping();

	public void bind(Object bean);
	
}
